<!DOCTYPE html>
<html>

  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0" />
    <meta name="format-detection" content="telephone=no" />
    <meta content="yes" name="mobile-web-app-capable">
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title>发布新闻</title>
    <link rel="stylesheet" type="text/css" th:href="@{css/backstage/layui.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{css/font_awesome.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{css/backstage/bootstrap.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{css/backstage/style.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{css/backstage/index.css}"/>
  </head>

  <body>
    <div id="index">
      <section>
        <!-- 内容区 -->
        <div class="main_content">
          <div class="content_header">
            <a href="index.html" title="首页">
              <i class="icon icon-home"></i>首页
            </a>
            <a class="current" href="javascript:;">发布新闻</a>
          </div>

          <div class="page_content">
            <div class="layui-tab">
              <ul class="layui-tab-title">
                <li tableurl="fbxw">内容管理</li>
                <li class="layui-this">发布内容</li>
                <li tableurl="flgl">分类管理</li>
                <li tableurl="xzfl">新增分类</li>
              </ul>
              <div class="layui-tab-content">
                <!-- 内容管理 -->
                <div class="layui-tab-item">
                    <div class="controls">
                      内容标题：
                      <input class="input-large" type="text" id="information_name">
                      <select class="input-medium" name="catid" id="information_tyype_select">
                        <option value>全部分类</option>
                        <option value="2">产品中心题</option>
                        <option value="32">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;├─  热门互动产品</option>
                        <option value="33">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;├─  大型互动投影</option>
                      </select>
                      <button class="btn btn-inverse">
                        <i class="icon-search icon-on-right bigger-110"></i>搜索
                      </button>
                      <a  class="btn btn-success btn-success-all">
                        <i class="icon-search icon-on-right bigger-110"></i>全部
                      </a>
                    </div>

                  <div class="layui-tab-content">
                      <table class="layui-table" lay-even lay-filter="productList">
                        <thead>
                          <tr>
                              <th lay-data="{checkbox:true}"><input type="checkbox" id="checkedAll" ></th>
                              <th lay-data="{field:'title'}">内容标题</th>
                              <th lay-data="{field:'img',width:'8%', align: 'center'}">缩略图</th>
                              <th lay-data="{field:'classify',width:'13%'}">所属分类</th>
                              <th lay-data="{field:'classify',width:'8%'}">排序</th>
                              <th lay-data="{field:'time',width:'10%', align: 'center'}">发布时间</th>
                              <th lay-data="{field:'opeartion',width:'13%', align: 'center'}">操作</th>
                          </tr>
                        </thead>
                        <tbody id="information_table_list">
                          <tr>
                            <td></td>
                              <td>
                                <input type="text" value="0" name="listorders[66]" placeholder="排序" style="width: 100%;height:24px">
                              </td>
                              <td>
                                <input type="text" value="互动蹦床公园整体解决方案" name="" class="input_edit span10" style="height:24px;border: none;box-shadow: none;">
                              </td>
                              <td>
                                <img src="" style="width: 50px;height: 50px;">
                              </td>
                              <td>其他</td>
                              <td>2019-06-24</td>
                              <td>
                                <div class="btn-group">
                                  <a href="javascript:;" class="btn btn-mini btn-success check_leaveMessage" title="编辑">编辑</a>
                                  <a href="http://www.m3games.com/qita/show-66.html" class="btn btn-mini btn-inverse" title="预览">预览</a>
                                  <a href="javascript:;" class="btn btn-mini btn-delete delete_content" title="删除">删除</a>
                                </div>
                              </td>
                          </tr>
                          <tr>
                            <td></td>
                              <td>
                                <input type="text" value="0" name="listorders[66]" placeholder="排序" style="width: 100%;height:24px">
                              </td>
                              <td>
                                <input type="text" value="互动蹦床公园整体解决方案" name="" class="input_edit span10" style="height:24px;border: none;box-shadow: none;">
                              </td>
                              <td>
                                <img src="" style="width: 50px;height: 50px;">
                              </td>
                              <td>其他</td>
                              <td>2019-06-24</td>
                              <td>
                                <div class="btn-group">
                                  <a href="javascript:;" class="btn btn-mini btn-success check_leaveMessage" title="编辑">编辑</a>
                                  <a href="javascript:;" class="btn btn-mini btn-delete delete_content" title="删除">删除</a>
                                </div>
                              </td>
                          </tr>
                        </tbody>
                      </table>
                      <div id="page"></div>

                      <button class="btn btn-small btn-info J_ajax_submit_btnconfirm" id="deleteAll">批量删除</button>
                  </div>

                </div>
                <!-- 发布内容 -->
                <div class="modal fade" id="myModal" data-backdrop="false" aria-hidden="true">
			        <div class="modal-dialog">
			            <div class="modal-content">
			                <div class="modal-header">
			                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
			                        <span aria-hidden="true">&times;</span>
			                    </button>
			                </div>
			                <div class="modal-body">
		                        <div class="form-group">
		                            <span>标题：<input class="form-control" type="text" id="title"></span>
		                        </div>
		                        <div class="form-group">
		                            <span>标签：<input class="form-control" type="text" id="alt"></span>
		                        </div>
		                        <div class="form-group">
		                            <button id="submitBtn"  class="btn btn-default btn-block btn-primary">确定</button>
		                        </div>
			                </div>
			                <div class="modal-footer"></div>
			            </div>
			        </div>
			    </div>
                <div class="layui-tab-item layui-show">
                  <div class="publicConten_form  layui-form" >
                    <div class="control-group" style="border-top: 0!important;">
                      <label class="control-label">
                        <i class="must_red">*</i>选择分类
                      </label>
                      <div class="controls">
                        <select  name="info[catid]" id="information_name_fbxw">
                          <option value>选择分类</option>
                          <option value="1">产品中心</option>
                          <option value="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;├─ 热门互动产品</option>
                        </select>
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label">
                        <i class="must_red">*</i>新闻标题
                      </label>
                      <div class="controls">
                        <input type="text" name="info[title]" value="" id="information_fbxw_cpbt">
                        <span class="help-inline">建议不超过80个字符</span>
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label"><i class="must_red">*</i>新闻关键词</label>
                      <div class="controls">
                        <div class="tags" tabindex="1" id="information_fbxw_cpgjz">
                            <input class="form-field-tags" type="text" placeholder="请输入SEO关键词" value="Tag Input Control" name="info[keywords]" style="display: none;">
                            <input type="text" placeholder="请输入SEO关键词" class="tags_enter" autocomplete="off">
                        </div>
                        <span class="help-inline" style="margin-top: 10px;">建议填写1-3个关键词，每填写1个关键词请敲键盘上的“回车键”，系统智能生成产品关键词标签！</span>
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label"><i class="must_red">*</i>SEO描述</label>
                      <div class="controls">
                        <textarea name="info[description]" id="information_fbxw_seomx"></textarea>
                        <span class="help-inline">建议不超过200个字符</span>
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label"><i class="must_red">*</i>新闻排序</label>
                      <div class="controls">
                        <input type="text"  value="1"  id="sort"  style="width:180px;">
                        <span class="help-inline">按照从小到大排序，数字越小越靠前</span>
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label"><i class="must_red">*</i>上传图片</label>
                      <div class="controls thumbnail_img">
                        <img src="images/upload-pic_128.png">
                        <div>
                          <input id="input_singleImg01" type="file" accept="image/*" style="width: 150px;border: none;box-shadow: none; background: none;" data-type="information"> 
                          <span class="help-inline" style="color:red;padding:5px 0 0 10px;float:left;">图片格式：jpg、jpeg、png、gif</span> 
                        </div>
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label">新闻内容</label>
                      <div class="controls">
                        <div id="content">
                          <div id="container1" style="height:370px;"> </div>
                        </div>

                      </div>
                    </div>

                    <div class="form-actions">
                      <button class="btn btn-success"  onclick="insertUpdateInformation()">
                        <i class="icon-ok bigger-110"></i> 提交
                      </button>
                    </div>
                  </div>

                </div>
                <!-- 分类管理 -->
                <div class="layui-tab-item">
                    <table class="table table-bordered table-striped">
                      <thead>
                        <tr>
                          <th width="40%">栏目名称</th>
                          <th width="20%">排序</th>
                          <th width="20%">是否启用</th>
                          <th width="20%">操作</th>
                        </tr>
                      </thead>
                      <tbody id="information_type_list">
                        <tr>
                          <td style="text-align: left;">
                            <input type="text" name="listorders[2]" placeholder="排序" value="2" class="span5" disabled style="background: #eee;">
                          </td>
                          <td class="t-l">
                            <input type="text" value="产品中心" disabled class="input_edit span8 left">
                          </td>
                          <td>产品展示系统</td>
                          <td>
                            <label>
                              <input type="checkbox" disabled checked>
                            </label>
                          </td>
                          <td>
                            <div class="btn-group">
                              <a href="javascript:;" class="btn btn-mini btn-info" title="添加子分类">添加子分类</a>
                              <a href="news_settingSystem.html" class="btn btn-mini btn-success" title="编辑">编辑</a>
                              <a href="http://www.m3games.com/qita/show-66.html" class="btn btn-mini btn-inverse " title="预览">预览</a>
                              <a href="javascript:;" class="btn btn-mini" title="删除" style="color: #999 !important">删除</a>
                            </div>
                          </td>
                        </tr>
                        <tr>
                          <td style="text-align: left;padding-left:30px;">├─
                            <input type="text" name="listorders[32]" placeholder="排序" value="0" class="span5">
                          </td>
                          <td style="text-align: left;padding-left:30px;">├─
                            <input type="text" value="热门互动产品" disabled class="input_edit span8">
                          </td>
                          <td>产品展示系统</td>
                          <td>
                            <label>
                              <input type="checkbox" checked>
                            </label>
                          </td>
                          <td>
                            <div class="btn-group">
                              <a href="javascript:;" class="btn btn-mini btn-info" title="添加子分类">添加子分类</a>
                              <a href="news_settingSystem.html" class="btn btn-mini btn-success" title="编辑">编辑</a>
                              <a href="http://www.m3games.com/xinwenzixun/" class="btn btn-mini btn-inverse" title="预览">预览</a>
                              <a href="javascript:;" class="btn btn-mini btn-delete delete_classify" title="删除">删除</a>
                            </div>
                          </td>
                        </tr>
                        <tr>
                          <td style="text-align: left;padding-left:30px;">├─
                            <input type="text" name="listorders[32]" placeholder="排序" value="0" class="span5">
                          </td>
                          <td style="text-align: left;padding-left:30px;">├─
                            <input type="text" value="2热门互动产品" disabled class="input_edit span8">
                          </td>
                          <td>2产品展示系统</td>
                          <td>
                            <label>
                              <input type="checkbox" checked>
                            </label>
                          </td>
                          <td>
                            <div class="btn-group">
                              <a href="javascript:;" class="btn btn-mini btn-info category_sub_add" title="添加子分类">添加子分类</a>
                              <a href="news_settingSystem.html" class="btn btn-mini btn-success" title="编辑">编辑</a>
                              <a href="http://www.m3games.com/xinwenzixun/" class="btn btn-mini btn-inverse" title="预览">预览</a>
                              <a href="javascript:;" class="btn btn-mini btn-delete delete_classify" title="删除">删除</a>
                            </div>
                          </td>
                        </tr>
                      </tbody>
                    </table>
<!--                     <div class="form-actions"> -->
<!--                       <button class="btn btn-success btn_submit J_ajax_submit_btn btn_disabled"> -->
<!--                         <i class="icon-ok bigger-110"></i> 保存  -->
<!--                       </button> -->
<!--                     </div> -->
                </div>
                
                
                <!-- 新增分类 -->
                <div class="layui-tab-item">
                  <div class="publicConten_form  layui-form" >
                  	<input type="hidden" id="type_id">
                    <div class="control-group">
                      <label class="control-label">
                        <i class="must_red">*</i>类型名称
                      </label>
                      <div class="controls">
                        <input type="text"  id="type_name">
                        <span class="help-inline">建议不超过20个字符</span>
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label"><i class="must_red">*</i>排序</label>
                      <div class="controls">
                        <input type="text"  value="1"  id="type_sort"  style="width:180px;">
                        <span class="help-inline">按照从小到大排序，数字越小越靠前</span>
                      </div>
                    </div>
                    <div class="control-group" >
                      <label class="control-label">
                        <i class="must_red">*</i>是否有效
                      </label>
                      <div class="controls">
                        <select   id="type_indexif">
                          <option value="1">有效</option>
                          <option value="2">无效</option>
                        </select>
                      </div>
                    </div>

                    <div class="form-actions">
                      <button class="btn btn-success"  onclick="insertUpdateInformationType()">
                        <i class="icon-ok bigger-110"></i> 提交
                      </button>
                    </div>
                  </div>

                </div>
                
                
                
                
                
                <!-- 编辑内容 -->
                <div class="layui-tab-item messageList">
                  <!-- 添加相关新闻弹窗 -->
                  <div class="aui_inner">
                    <div class="aui_dialog">
                      <div class="aui_header">
                        <div class="aui_titleBar">
                          <div class="aui_title" style="cursor: move;">添加相关新闻</div>
                          <a href="javascript:;" class="aui_close">×</a>
                        </div>
                      </div>

                      <div class="aui_main">
                        <div class="aui_content aui_state_full" style="padding: 5px 10px 10px;">
                          <p style="padding:5px 0">已添加<em id="num" style="color:red;font-style: normal;">0</em>条相关内容，还可添加<em id="num_s" style="color:red;font-style: normal;">8</em>条</p>
                            <div class="search_type cc mb10">
                              <span>关键字：
                                <input class="input length_2 input-small" type="text" name="keywords" placeholder="请输入关键字...">
                                <select class="input-medium">
                                  <option value="0">请选择分类</option>
                                  <option value="1">成功案例</option>
                                </select>
                                <button class="btn btn-inverse">
                                  <i class="icon-search icon-on-right bigger-110">搜索</i>
                                </button>
                              </span>
                            </div>
                            <table class="table_list">
                              <thead style="background: #ebebeb;">
                                <tr style="height: 37px;">
                                  <th style="width: 24px;">
                                    <span class="checker">
                                      <input type="checkbox" class="all">
                                    </span>
                                  </th>
                                  <th>内容标题</th>
                                  <th style="width: 80px;text-align:center;">缩略图</th>
                                  <th style="width: 140px;">所属分类</th>
                                </tr>
                              </thead>
                              <tbody>
                                <tr>
                                  <td>
                                    <input type="checkbox" name="ids[]" class="all">
                                  </td>
                                  <td>智立方十项互动全能运动馆，专为孩子设计的运动胜地！</td>
                                  <td>
                                    <img src="" style="width: 50px;height: 50px;">
                                  </td>
                                  <td style="text-align:left;">缩略图</td>
                                </tr>
                                <tr>
                                  <td>
                                    <input type="checkbox" name="ids[]" class="all">
                                  </td>
                                  <td>2智立方十项互动全能运动馆，专为孩子设计的运动胜地！</td>
                                  <td>
                                    <img src="" style="width: 50px;height: 50px;">
                                  </td>
                                  <td style="text-align:left;">缩略图</td>
                                </tr>
                                <tr>
                                  <td>
                                    <input type="checkbox" name="ids[]" class="all">
                                  </td>
                                  <td>3智立方十项互动全能运动馆，专为孩子设计的运动胜地！</td>
                                  <td>
                                    <img src="" style="width: 50px;height: 50px;">
                                  </td>
                                  <td style="text-align:left;">缩略图</td>
                                </tr>
                                <tr>
                                  <td>
                                    <input type="checkbox" name="ids[]" class="all">
                                  </td>
                                  <td>4智立方十项互动全能运动馆，专为孩子设计的运动胜地！</td>
                                  <td>
                                    <img src="" style="width: 50px;height: 50px;">
                                  </td>
                                  <td style="text-align:left;">缩略图</td>
                                </tr>
                              </tbody>

                            </table>
                          <div id="dialog_page"></div>
                        </div>
                      </div>
                    </div>

                  </div>
                </div>
               
              </div>
            </div>

          </div>
        </div>
      </section>
      <footer></footer>
	<input type="hidden" id="information_id">
    </div>

     <script type="text/javascript" th:src="@{libs/jquery-2.1.0.min.js}"></script>
     <script type="text/javascript" th:src="@{libs/bootstrap.min.js}"></script>
    <script type="text/javascript" th:src="@{libs/wangEditor.min.js}"></script>
    <script type="text/javascript" th:src="@{libs/base64.js}"></script>
    <script type="text/javascript" th:src="@{plugins/layui.js}" charset="utf-8"></script>
    <script type="text/javascript" th:src="@{js/backstage/style.js}" charset="utf-8"></script>
    <script type="text/javascript" th:src="@{js/backstage/news.js}"></script>
    <!-- 实例化编辑器 -->
    <script type="text/javascript">
    var E = window.wangEditor;
    var editor1 = new E('#container1');
    editor1.customConfig.uploadImgServer = baseUrl+'productController/imgUpload'; // 上传图片到服务器 显示上传图片选项
    editor1.customConfig.uploadFileName = 'img';
    editor1.customConfig.uploadImgParams = {		//设置参数文件夹
   		 type: 'product'
	 }
 	// 取消粘贴过滤
    editor1.customConfig.pasteFilter = false;
	editor1.customConfig.showLinkImg = false;		// 隐藏“网络图片”tab
    editor1.create();
      // 添加相关新闻弹窗
      layui.use(['layer','laypage','table'], function() {
        var layer = layui.layer,laypage = layui.laypage,table = layui.table;
        laypage.render({
          elem: 'dialog_page',
          count: 100,
          layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
          jump: function(obj) {
            // console.log(obj)
          }
        });
      })

      // 内容管理
      layui.use(['laypage','table','layer'], function(){
          var laypage = layui.laypage,
                  table = layui.table,
                  layer = layui.layer;
       })   
    </script>
  </body>

</html>